package com.qfjy.controller;

import com.qfjy.entity.po.MeetingPub;
import com.qfjy.service.MeetingPubService;
import com.qfjy.util.resulst.ResultCode;
import com.qfjy.util.resulst.ResultJson;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @ClassName controller
 * @Description TODO
 * @Author guoweixin
 * @Date 2022/8/10
 * @Version 1.0
 */
@Controller
@RequestMapping("meetingPub")
public class MeetingPubController {

    @Autowired
    private MeetingPubService meetingPubService;

    /**
     * TODO 后台管理端 进行会议信息查询
     */

    @GetMapping("select")
    @ResponseBody
    public Object select(@RequestParam("id")String id){

        MeetingPub meetingPub= meetingPubService.selectByPrimaryKey(id);

        if(meetingPub==null){
            return  new ResultJson<>(null, ResultCode.NOT_DATA);
        }

        return  new ResultJson<>(meetingPub,ResultCode.SUCCESS) ;
    }
}
